//
//  ContactViewController.m
//  AoJi
//
//  Created by Administrator on 15/1/20.
//  Copyright (c) 2015年 xuanheng. All rights reserved.
//

#import "ContactViewController.h"

@interface ContactViewController ()

@end

@implementation ContactViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UIView *titleview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 224)];
    titleview.backgroundColor=[UIColor whiteColor];
    
    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(110, 30, 100, 30)];
    titleLabel.text=@"联系澳际";
    titleLabel.textAlignment=NSTextAlignmentCenter;
    [titleview addSubview:titleLabel];
    
    UIButton *back = [UIButton buttonWithType:UIButtonTypeCustom];
    back.frame=CGRectMake(20, 20, 44, 44);
    back.backgroundColor=[UIColor redColor];
    [back addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
    [titleview addSubview:back];
    [self.view addSubview:titleview];
    
    
    //
    UITableView *tableview = [[UITableView alloc]init];
    tableview.frame=CGRectMake(0, titleview.frame.size.height, self.view.frame.size.width, 1000);
    tableview.dataSource=self;
    tableview.delegate=self;
    [self.view addSubview:tableview];
}

-(void)back
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

#pragma mark tableview
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *indetifier =@"cell";
    UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indetifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indetifier];
    }
    [cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
    
    return cell;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
